package linkedList;

public class Main {

	public static void main(String[] args) {
		LinkedList<Integer> ll = new LinkedList<Integer>();
		for(int i = 0 ; i < 5 ; i++) {
			ll.addFirst(i);
			System.out.println(ll);
		}
		ll.addLast(520);
		System.out.println(ll);
		System.out.println("************************");
		System.out.println(ll.get(3));
		ll.set(3, 333);
		System.out.println(ll.get(3));
		System.out.println(ll.contains(1));
		System.out.println("***************");
		System.out.println(ll);
		ll.remove(0);
		System.out.println(ll);
		ll.removeFirst();
		System.out.println(ll);
		ll.removeLast();
		System.out.println(ll);
		ll.removeElement(333);
		System.out.println(ll);
	}

}
